package com.able.concurrency.t5;

import java.util.concurrent.Executor;

/**
 * @author abel.he
 * @data 2018/10/29 12:47
 * @describe
 * 连接池底层处理机制
 * 在使用线程池的时候，底层如何调用线程中的逻辑
 */
public class Test1_MyExecutor implements Executor {

    public static void main(String[] args) {
        new Test1_MyExecutor().execute(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName() + " - " + "连接池底层实现");
            }
        });
    }

    @Override
    public void execute(Runnable command) {
        new Thread(command).start();
    }
}
